#pragma once
#include "Card.h"
#include <Windows.h>
#include "Account.h"

#define  MAX_ATM_MONEY 50000000
#define  MAX_AMOUNT 5000000
#define  MAX_INVALID 3
#define  MAX_WITHDRAW_DAILY 5
#define  LENGTH_PIN 6
#define  LENGTH_CARDID 16

extern HINSTANCE hGlobalInst;

extern CCard g_Card;
extern CAccount g_Account;
extern int g_iTransID; 
extern int g_nCount;

extern char g_sCardIDInput[];
extern char g_sCardIDInputBefore[];
extern char g_sNewPIN[];
extern char g_sNewPINRepeat[];

static const char DELIM[] = "|";
static const char DELIM_DATE[] = "-";

static const char CARD_ERROR_CAPTION[] = "Card error";
static const char CARD_INVALID[] = "Card invalid.";
static const char LENGTH_CARD_INVALID[] = "Length card invalid.";

static const char CARD_LOCKED_CAPTION[] = "Card locked";
static const char CARD_LOCKED[] = "Your card is locked forever.";
static const char CARD_LOCKED_TMP[] = "Your card is locked template. Please contact to our bank to unlock!";

static const char PIN_INVALID_CAPTION[] = "PIN Invalid";
static const char LENGTH_PIN_INVALID[] = "Length PIN invalid. Please receive your card and try again!";
static const char PIN_INVALID[] = "PIN invalid. Please receive your card and try again!";

static const char LENGTH_NEW_PIN_INVALID[] = "Length new PIN invalid. Please input new PIN again!";
static const char NEW_PIN_INVALID[] = "New PIN must be different from old PIN. Please input new PIN again!";
static const char NEW_PIN_REPEAT_INVALID[] = "You re-input new PIN invalid. Please try change PIN again!";
static const char CHANGE_PIN_SUCCESS[] = "Your PIN is changed successfully";
static const char CHANGE_PIN_SUCCESS_CAPTION[] = "Success";
static const char STATIC_INPUT_NEW_PIN[] = "Please enter your new PIN";
static const char STATIC_REINPUT_NEW_PIN[] = "Please re-input your new PIN:";

static const char CANNOT_OPEN_FILE[] = "Can not open file";
static const char ERROR_CHECK_BALANCE[] = "The amount smaller than the balance";
static const char ERROR_CHECK_MONEY_ATM[] = "The money of ATM not enough";
static const char ERROR_CHECK_DAILYWITHDRAW[] = "You can not withdraw money more than 5 times a day";
static const char ERROR_CHECK_AMOUNT[] = "You can not withdraw more than %d each";
static const char ERROR_WITHDRAW_CAPTION[] = "Withdraw Error";
static const char ERROR_WITHDRAW_OTHER[] = "Your amount money is a multiple of 10000";

static const char FILE_CARD[] = ".\\Data\\Card.txt";
static const char FILE_CARD_TMP[] = ".\\Data\\CardTmp.txt";

static const char FILE_TRANSCATION[] = ".\\Data\\Transaction.txt";
static const char FILE_ACCOUNT[] = ".\\Data\\Account.txt";
static const char FILE_ACCOUNT_TMP[] = ".\\Data\\Account2.txt";
static const char FILE_ATM[] = ".\\Data\\ATM.ini";

static const char PRINT_RECEIPT_TEXT[]="Do you want to print the receipt?";
static const char PRINT_RECEIPT_CAPTION[]="Print the receipt";
static const char CONTINOUS_TRANSACTION_TEXT[]="Do you want to continue other transaction?";
static const char CONTINOUS_TRANSACTION_CAPTION[]="Continue";


